//
//  TSCMyNetworkUtil.m
//  Tsc_IOS
//
//  Created by Rio on 15-5-7.
//  Copyright (c) 2015年 idream. All rights reserved.
//

#import "TSCMyNetworkUtil.h"
#import "Reachability.h"

@implementation TSCMyNetworkUtil

/**
 * 检查网络联通性
 *
 * @date 2015-05-07
 * @author Rio
 */
+ (BOOL) checkNetwork {
    Reachability *reach = [Reachability reachabilityForInternetConnection];
    
//     Reachability *reach = [Reachability reachabilityWithHostName:@"www.baidu.com"];
    
    NetworkStatus ns = [reach currentReachabilityStatus];
    
    if (ns == NotReachable) {
        return false;
    } else {
        return true;
    }
}

@end
